package vn.com.shoppie.sobject;

import com.hoasua.adb.adbException;


@SuppressWarnings("serial")
public class Campaign extends ShoppieObject {
	public static final String CLASS_UNIQUE="Campaign";
	public static final int NUM_FIELDS=5;
	
	public String id="";
	public String merchId="";
	public String name="";
	public String desc="";
	public String linkImage="";
	public Campaign(int id,String... values) {
		super(id,values);
		
		try {
			if (values.length != NUM_FIELDS)
				throw new adbException(CLASS_UNIQUE+" length values invalid!");
		} catch (adbException e) {
			e.printStackTrace();
		}
		
		this.id=values[0];
		this.merchId=values[1];
		this.name=values[2];
		this.desc=values[3];
		this.linkImage=values[4];
		
	}

	@Override
	public String toString() {
		return "Campaign [id=" + id + ", merchId=" + merchId + ", name=" + name + ", desc=" + desc + ", linkImage=" + linkImage + "]";
	}
	public interface CampaignColumn extends ShoppieObjectColumn{
		public static final String TABLE_NAME = "campaign";
		
		public static final String MERCH_ID="merchId";
		public static final String NAME="name";
		public static final String DESC="desc";
		public static final String LINK_IMAGE="linkImage";
	}
}
